import java.util.Arrays;
import java.util.Scanner;

public class Work5 {
    public static int[] search(int[] array, int target) {
        int[] a = new int[2];
        for (int i = 0; i < array.length; i++) {
            for (int j = i + 1; j < array.length; j++) {
                if (array[i] + array[j] == target) {
                    a[0] = i;
                    a[1] = j;
                    return a;
                }
            }
        }
        return null;
    }

    public static void main(String[] args) {
        int[] array = {2, 7, 11, 15};
        Scanner in = new Scanner(System.in);
        int target = in.nextInt();
        //查找
        System.out.println(Arrays.toString(search(array, target)));
    }
}
